//
// Created by jsjxsy on 2022/7/7.
//

#include <stdio.h>

void explict_typecast() {
  int sum = 17, count = 5;
  double mean;

  mean = (double) sum / count;
  printf("Value of mean : %f\n", mean);


}

double implicit_typecast2() {
  double a = 15;
  double b = 5;
  double result = a/b;//降级
  printf("Value of result : %f\n", result);
  return result;
}

void implicit_typecast() {
  int i = 17;
  char c = 'c'; /* ascii 值是 99 */
  int sum;

  sum = i + c;
  printf("Value of sum : %d\n", sum);
}
int main() {
  explict_typecast();
  implicit_typecast();
  int result = implicit_typecast2();
  printf("Value of result main : %d\n", result);
  return 0;
}